﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Admin/MasterPage.master" AutoEventWireup="true"
    CodeFile="TourList.aspx.cs" Inherits="Admin_Modules_Tour_TourList" %>

<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>
<%@ Register TagPrefix="avg" Namespace="Avg.Controls" Assembly="SmartPager" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="Server">  
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
         <%-------------------------------------%>
        <div class="header" style="width: 1080px; text-align: left">
            SEARCH
            <div class="content-IE">
                <div class="box-1" style="float: left">
                    Title:
                    <asp:TextBox ID="txtTitle" runat="server"></asp:TextBox>
                </div>
                <div class="box-1" style="float: left">
                    Loại tour:
                    <asp:DropDownList ID="ddlTourType" runat="server" AppendDataBoundItems="true">
                        <asp:ListItem Value="-1">----- Loại Tour -----</asp:ListItem>
                    </asp:DropDownList>
                </div>
                <div class="box-1" style="float: left">
                    Promotion:
                    <asp:DropDownList ID="ddlPromotion" runat="server" AppendDataBoundItems="true">
                        <asp:ListItem Value="-1">----- Tất cả -----</asp:ListItem>
                        <asp:ListItem Value="1">Tour KM</asp:ListItem>
                        <asp:ListItem Value="0">Tour Thường</asp:ListItem>
                        <asp:ListItem></asp:ListItem>
                    </asp:DropDownList>
                </div>
                <div class="box-1">
                    Tour Hot:
                    <asp:DropDownList ID="ddlIsHot" runat="server" AppendDataBoundItems="true">
                        <asp:ListItem Value="-1">----- Tất cả -----</asp:ListItem>
                        <asp:ListItem Value="1">Tour Hot</asp:ListItem>
                        <asp:ListItem Value="0">Tour Thường</asp:ListItem>
                        <asp:ListItem></asp:ListItem>
                    </asp:DropDownList>
                    <%--<div class="clear"></div>--%>
                </div>
                <br />
                <div class="box-1">
                    Trạng thái tour:
                    <asp:DropDownList ID="ddlVisible" runat="server" AppendDataBoundItems="true">
                        <asp:ListItem Value="-1">----- Tất cả -----</asp:ListItem>
                        <asp:ListItem Value="1">Hiển thị</asp:ListItem>
                        <asp:ListItem Value="0">Ẩn</asp:ListItem>
                        <asp:ListItem></asp:ListItem>
                    </asp:DropDownList>
                    Hiên thị trang chủ: &nbsp;
                    <asp:DropDownList ID="ddlIsHome" runat="server" AppendDataBoundItems="true">
                        <asp:ListItem Value="-1">----- Tất cả -----</asp:ListItem>
                        <asp:ListItem Value="1">Tour Hiển thị trang chủ</asp:ListItem>
                        <asp:ListItem Value="0">Tour Thường</asp:ListItem>
                        <asp:ListItem></asp:ListItem>
                    </asp:DropDownList>
                    Xếp theo ngày tạo:
                    <asp:DropDownList ID="ddlExpression" runat="server" AppendDataBoundItems="true">
                        <asp:ListItem Value="-1">----- Loại Tour -----</asp:ListItem>
                        <asp:ListItem Value="Name">Tên</asp:ListItem>
                        <asp:ListItem Value="CreatedDate">Ngày tạo</asp:ListItem>
                        <asp:ListItem Value="DisplayOrder">Vị trí sắp xếp</asp:ListItem>
                    </asp:DropDownList>
                    Xếp theo ký tự:
                    <asp:DropDownList ID="ddlCollate" runat="server" AppendDataBoundItems="true">
                        <asp:ListItem Value="ASC">Tăng dần</asp:ListItem>
                        <asp:ListItem Value="DESC">Giảm dần</asp:ListItem>
                    </asp:DropDownList>
                </div>
                <div class="box-btnSearch">
                    <asp:Button ID="Button1" runat="server" Text="Tìm" Width="100%" OnClick="btnSearch_Click" />
                </div>
                <div style="clear: both">
                </div>
            </div>
            <div class="clear">
            </div>
        </div>
        <%-----------------------------------------------%>
        <div class="header" style="width: 1080px; text-align: left;margin:5px 0 5px 0">
            DANH SÁCH TOUR
            <div class="content-IE">
                <div id="tabs1-1">
                    <div style="text-align: right;">
                        <a href='/Admin/Modules/Tour/TourAE.aspx'>
                            <input type="button" class="ui-widget-content ui-corner-all textfield cursor" value="Thêm tour" /></a>
                        <asp:Button ID="Button2" runat="server" Text="Cập nhật vị trí" CssClass="ui-widget-content ui-corner-all textfield cursor"
                            OnClick="btnUpdateOrder_Click" />
                    </div>
                    <asp:GridView ID="grv" runat="server" AutoGenerateColumns="False" Width="100%" CssClas="tablestyle"
                        OnRowDeleting="grv_RowDeleting" OnPageIndexChanging="grv_PageIndexChanging" CellPadding="4"
                        ForeColor="#333333" GridLines="None">
                        <EditRowStyle BackColor="#2461BF" />
                        <FooterStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
                        <HeaderStyle CssClass="headerstyle" BackColor="#507CD1" Font-Bold="True" ForeColor="White">
                        </HeaderStyle>
                        <PagerStyle BackColor="#2461BF" ForeColor="White" HorizontalAlign="Center" />
                        <RowStyle CssClass="rowstyle" BackColor="#EFF3FB" />
                        <AlternatingRowStyle CssClass="altrowstyle" BackColor="White" />
                        <Columns>
                            <asp:TemplateField HeaderText="Stt" HeaderStyle-HorizontalAlign="Center" ItemStyle-HorizontalAlign="Center">
                                <ItemTemplate>
                                    <%#Container.DataItemIndex +1 %>
                                </ItemTemplate>
                                <HeaderStyle HorizontalAlign="Center"></HeaderStyle>
                                <ItemStyle Width="30px" />
                            </asp:TemplateField>
                            <asp:TemplateField HeaderText="Image">
                                <ItemTemplate>
                                    <img src="<%#Eval("ImageTour")%>" alt="<%#Eval("Name")%>" style="width: 50px; height: 50px;" />
                                </ItemTemplate>
                            </asp:TemplateField>
                            <asp:TemplateField HeaderText="Name">
                                <ItemTemplate>
                                    <a title='<%#Eval("TextId") %>'>
                                        <%#Eval("Name")%></a>
                                </ItemTemplate>
                            </asp:TemplateField>
                            <asp:TemplateField HeaderText="Loai Tour">
                                <ItemTemplate>
                                    <a title='<%#Eval("TextId") %>'>
                                        <%#Eval("TourTypeName")%></a>
                                </ItemTemplate>
                            </asp:TemplateField>
                            <asp:TemplateField HeaderText="Hiển thị" HeaderStyle-HorizontalAlign="Center" ItemStyle-HorizontalAlign="Center"
                                ItemStyle-VerticalAlign="Top">
                                <ItemTemplate>
                                    <asp:CheckBox ID="cbVisible" runat="server" Checked='<%#Eval("IsVisible") %>' Enabled="false" />
                                </ItemTemplate>
                                <HeaderStyle HorizontalAlign="Center"></HeaderStyle>
                                <ItemStyle Width="50px" />
                            </asp:TemplateField>
                            <asp:TemplateField HeaderText="Order" HeaderStyle-HorizontalAlign="Center" ItemStyle-HorizontalAlign="Center"
                                ItemStyle-VerticalAlign="Top">
                                <ItemTemplate>
                                    <asp:TextBox ID="txtOrder" runat="server" Text='<%#Eval("DisplayOrder") %>' Width="30"></asp:TextBox>
                                    <asp:RequiredFieldValidator ControlToValidate="txtOrder" ID="RequiredFieldValidator1"
                                        runat="server" ErrorMessage="*" ForeColor="Red"></asp:RequiredFieldValidator>
                                    <asp:RegularExpressionValidator ID="RegularExpressionValidator1" runat="server" ErrorMessage="*"
                                        ControlToValidate="txtOrder" ValidationExpression="^([0-9]|[0-9][0-9]|[1][0][0])$"
                                        ForeColor="Red"></asp:RegularExpressionValidator>
                                    <asp:HiddenField ID="hdfID" runat="server" Value='<%#Eval("ID") %>' />
                                    <asp:HiddenField ID="hdfTourTypeId" runat="server" Value='<%#Eval("TourTypeId") %>' />
                                    <asp:HiddenField ID="hdfOrder" runat="server" Value='<%#Eval("DisplayOrder") %>' />
                                </ItemTemplate>
                                <HeaderStyle HorizontalAlign="Center"></HeaderStyle>
                                <ItemStyle Width="50px" />
                            </asp:TemplateField>
                            <asp:TemplateField HeaderText="" HeaderStyle-HorizontalAlign="Center" ItemStyle-Width="60px"
                                ItemStyle-HorizontalAlign="Center">
                                <ItemTemplate>
                                    <a href="TourDetailList.aspx?TourId=<%#Eval("Id") %>">Chi tiết</a> <a href="TourImageList.aspx?TourId=<%#Eval("Id") %>">
                                        Hình ảnh</a> <a href="TourAE.aspx?TourId=<%#Eval("Id") %>">
                                            <img src='/images/ico-promotions.png' alt='' />
                                            Edit</a><br />
                                    <asp:LinkButton ID="lnkDelete" runat="server" CommandArgument='<%#Eval("Id") %>'
                                        OnClientClick="return confirm('Bạn muốn xóa không?')" CommandName="Delete"><img src='/images/unchecked.gif' alt='' />Delete
                                    </asp:LinkButton>
                                </ItemTemplate>
                                <HeaderStyle HorizontalAlign="Center"></HeaderStyle>
                                <ItemStyle VerticalAlign="Top" />
                            </asp:TemplateField>
                        </Columns>
                        <SelectedRowStyle BackColor="#D1DDF1" Font-Bold="True" ForeColor="#333333" />
                        <%--<SortedAscendingCellStyle BackColor="#F5F7FB" />
                        <SortedAscendingHeaderStyle BackColor="#6D95E1" />
                        <SortedDescendingCellStyle BackColor="#E9EBEF" />
                        <SortedDescendingHeaderStyle BackColor="#4870BE" />--%>
                    </asp:GridView>
                    <div style="text-align: right; margin-top: 15px">
                        <asp:Button ID="Button3" runat="server" Text="Cập nhật vị trí" CssClass="ui-widget-content ui-corner-all textfield cursor"
                            OnClick="btnUpdateOrder_Click" />
                    </div>
                    <avg:SmartPager ID="smartPager" runat="server" Visible="false" />
                </div>
            </div>
            <div class="clear">
            </div>
        </div>
        <%----------------------------------------%>
</asp:Content>
